{% extends '../common/layout.html' %}
  {% block title %} index {% endblock %}
{% block head %}
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/base.css">
{% endblock %}
{% block content %}
  <div>
    <span>权限</span>
    <p class="b-0">梵蒂冈梵蒂冈梵蒂冈地方</p>
  </div>
{% endblock %}
{% block js %}
<script>
  layui.use(['jquery','element'] , function () {
      var $ = layui.jquery;
      setCookie("name","hayden","s20");
      $.get('/api/test?name=13616197695' , function (data) {
        console.log(data);
      })
  })
  function getsec(str) {
      var str1=str.substring(1,str.length)*1;
      var str2=str.substring(0,1);
      if (str2=="s")
      {
          return str1*1000;
      }
      else if (str2=="h")
      {
          return str1*60*60*1000;
      }
      else if (str2=="d")
      {
          return str1*24*60*60*1000;
      }
  }
  function setCookie(name,value,time) {
      var strsec = getsec(time);
      var exp = new Date();
      exp.setTime(exp.getTime() + strsec*1);
      document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
  }
</script>
{% endblock %}